package command;

/**
 * @Author: linKe
 * @Date: 2022/1/14 23:12
 * @FileName: LightOnCommand
 * @version: 1.0
 * @Description: 打开电灯命令
 */
public class LightOnCommand implements Command{
    private Light light;

    public LightOnCommand(Light light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.on();
    }

    @Override
    public void undo() {
        light.off();
    }

}
